﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using CMS.BLL;

public partial class Controls_Cruise_ctrAboutCruise : System.Web.UI.UserControl
{
    int nCurentLanguage = Support.GetCurrentLanguage();
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            int nRegion = ConvertData.ConvertToInt(Request.QueryString[Config.CRUISEREGION]);
            StaticPages objStaticPage = new StaticPages();
            
            if (nRegion == 1)
            {
                objStaticPage.LoadById(Config.HALONGCRUISEID);
                
            }
            else if (nRegion == 2)
            {
                objStaticPage.LoadById(Config.MEKONGCRUISEID);
            }



            switch (nCurentLanguage)
            {
                case 1:
                    lblContact.Text = ConvertData.ConvertToString(objStaticPage.Data.PageName1).ToUpper();
                    ltrIntroduce.Text = ConvertData.ConvertToString(objStaticPage.Data.PageContent1);
                    break;
                case 2:
                    lblContact.Text = ConvertData.ConvertToString(objStaticPage.Data.PageName2).ToUpper();
                    ltrIntroduce.Text = ConvertData.ConvertToString(objStaticPage.Data.PageContent2);
                    break;
                case 3:
                    lblContact.Text = ConvertData.ConvertToString(objStaticPage.Data.PageName3).ToUpper();
                    ltrIntroduce.Text = ConvertData.ConvertToString(objStaticPage.Data.PageContent3);
                    break;
            }
        }
    }
}